home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Estrategia / ant_war.swf / scripts / DefineButton2_426 / BUTTONCONDACTION on(press).as next >
Encoding:
Text File  |  2007-03-13  |  782 b   |  23 lines

  1. on(press){
  2.    var thisname = parseInt(this._name.substr("location_".length));
  3.    var message;
  4.    if(_root.lastscene == "colony_nest")
  5.    {
  6.       message = "You are about to move to " + _root.localename[thisname] + "\n";
  7.       message += "This will cost you " + _root.locale_cost[thisname] + " Gems\n";
  8.       message += "This will use " + parseInt(_root.antstats[_root.gc_pop] / _root.upkeepcost / _root.foodmovecost) + " food\n";
  9.       _root.confirm_action("nest",thisname,message);
  10.    }
  11.    else
  12.    {
  13.       _root.select_locale(thisname);
  14.       if(_root.lastlocale != _root.localetype)
  15.       {
  16.          _root.move_nest(0);
  17.       }
  18.       _root.lastlocale = _root.localetype;
  19.       _root.locale_visited[_root.localetype] = true;
  20.       _root.pause = false;
  21.    }
  22. }
  23.